﻿using System;
using UnityEngine;
using UnityEngine.EventSystems;

public class InitEventSystem
{
    [RuntimeInitializeOnLoadMethod]
    private static void Init()
    {
        EventSystem original = Resources.Load<EventSystem>("EventSystem");
        if (original != null)
        {
            UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object.Instantiate<EventSystem>(original));
        }
    }
}

